package com.example.workshop.lesson6;

import com.example.workshop.lesson6.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class RecommenderImplementation {
   @Autowired
   @Qualifier("CF")
    private Filter filter;

//    public RecommenderImplementation(Filter contentBaseFilter) {
//        super();
//        this. contentBaseFilter= contentBaseFilter;
//    }

    public String [] recommendMovies(String movie){
        //打印正在使用的接口名称
        System.out.println("打印正在使用的Filter是："+filter+"\n");

       String results[]= filter.getRecommendations("流浪地球");

       return results;
    }
}
